using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace Decav.Gatsb.Configuration
{
    /// <summary>
    /// Holds a collection of <see cref="MobileProviderConfiguration"/> for the <see cref="GatsbConfigurationSection"/>.
    /// </summary>
    public class MobileProviderConfigurationCollection : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new MobileProviderConfiguration();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((MobileProviderConfiguration)element).Name;
        }

        public override ConfigurationElementCollectionType CollectionType
        {
            get
            {
                return ConfigurationElementCollectionType.AddRemoveClearMap;
            }
        }
    }
}
